package com.panfeng.xcloud.scheduler.service.impl;

import com.panfeng.xcloud.scheduler.init.LoadDataDictionaryConfigService;
import com.panfeng.xcloud.scheduler.service.IFeignService;
import com.panfeng.xcloud.scheduler.service.ISyncDataDictionaryConfigService;
import groovy.util.logging.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class SyncDataDictionaryConfigServiceImpl implements ISyncDataDictionaryConfigService {

    private static Logger log = LoggerFactory.getLogger(SyncDataDictionaryConfigServiceImpl.class);

    @Autowired
    private LoadDataDictionaryConfigService loadDataDictionaryConfigService;

    @Autowired
    private IFeignService feignService;

    @Override
    public void syncDataDictionaryConfig() {
        //同步scheduler服务字典表
        loadDataDictionaryConfigService.init();

        //同步assets服务字典表
        feignService.syncAssetsDataDictionary();

        //同步member服务字典表
        feignService.syncMemberDataDictionary();
    }

}
